#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.61)
AC_INIT([pidgin-dbus],[0.6.1+devel],[matlinuxer2@gmail.com])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/pidgindbus.c])
AC_CONFIG_HEADER([config.h])

# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_LIBTOOL
AC_LIBTOOL_WIN32_DLL

# Checks for libraries.

# Check for gtk+
PKG_CHECK_MODULES(GTK, [gtk+-2.0], , [
	AC_MSG_RESULT(no)
	AC_MSG_ERROR([

You must have the GTK+ 2.0 development headers installed to compile Pidgin.
If you want to build only Finch then specify --disable-gtkui when running configure.
])])
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)


# Check for pidgin and libpurple
PKG_CHECK_MODULES(PURPLE, [purple >= 2.4.3], , [                                                  
        AC_MSG_ERROR([
You must have the libpurple installed to build.

If you have these installed already you may need to install pkg-config so
I can find them.
])])
AC_SUBST(PURPLE_CFLAGS)
AC_SUBST(PURPLE_LIBS)

PKG_CHECK_MODULES(PIDGIN, [pidgin >= 2.4.3], , [                                                  
        AC_MSG_ERROR([
You must have the pidgin installed to build.

If you have these installed already you may need to install pkg-config so
I can find them.
])])
AC_SUBST(PIDGIN_CFLAGS)
AC_SUBST(PIDGIN_LIBS)

PKG_CHECK_MODULES(DBUSCXX, [dbus-c++-1], , [                                                  
        AC_MSG_ERROR([
You must have the D-Bus C++ binding library installed to build.

If you have these installed already you may need to install pkg-config so
I can find them.
])])
AC_SUBST(DBUSCXX_CFLAGS)
AC_SUBST(DBUSCXX_LIBS)

# Checks for header files.
AC_DEFINE_UNQUOTED(DISPLAY_VERSION, "$VERSION", [display version info])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST

# Checks for library functions.
AC_CHECK_FUNCS([strstr])


AC_CONFIG_FILES([Makefile 
include/Makefile 
src/Makefile 
examples/001/Makefile
examples/Makefile
])
AC_OUTPUT
